<template>
  <div class="home">
    <!-- 首页 -->
    <el-row :gutter="20" class="header-section">
      <el-col :span="24">
        <div class="header-content">
          <h1>云联智控物联网管理平台</h1>
          <p>连接万物，智控未来 — 高效管理您的物联网设备与云服务</p>
<!--          <el-button type="primary" size="large" @click="goTarget('http://ruoyi.vip')">了解更多</el-button>-->
        </div>
      </el-col>
    </el-row>

    <!-- 功能介绍 -->
    <el-row :gutter="20" class="feature-section">
      <el-col :xs="24" :sm="12" :md="8">
        <el-card class="feature-card">
          <svg-icon icon-class="cloud" class="feature-icon" />
          <h3>云端管理</h3>
          <p>通过云计算技术，实现设备数据的高效存储、处理与分析，保障系统高可用性。</p>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="12" :md="8">
        <el-card class="feature-card">
          <svg-icon icon-class="iot" class="feature-icon" />
          <h3>物联网连接</h3>
          <p>支持多种物联网协议，实时监控与管理设备，构建智能互联生态。</p>
        </el-card>
      </el-col>
      <el-col :xs="24" :sm="12" :md="8">
        <el-card class="feature-card">
          <svg-icon icon-class="security" class="feature-icon" />
          <h3>安全可靠</h3>
          <p>采用 Spring Security 和 JWT 技术，确保数据传输与访问的安全性。</p>
        </el-card>
      </el-col>
    </el-row>

    <!-- 更新日志 -->
    <el-row :gutter="20" class="log-section">
      <el-col :span="24">
        <el-card class="log-card">
          <template #header>
            <div class="clearfix">
              <span>更新日志</span>
            </div>
          </template>
          <el-collapse accordion>
            <el-collapse-item title="v3.8.7 - 2023-12-08">
              <ol>
                <li>操作日志记录部门名称</li>
                <li>全局数据存储用户编号</li>
                <li>新增编程式判断资源访问权限</li>
                <li>操作日志列表新增IP地址查询</li>
                <li>其他细节优化</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item title="v3.8.6 - 2023-06-30">
              <ol>
                <li>支持登录IP黑名单限制</li>
                <li>新增监控页面图标显示</li>
                <li>操作日志新增消耗时间属性</li>
                <li>其他细节优化</li>
              </ol>
            </el-collapse-item>
          </el-collapse>
        </el-card>
      </el-col>
    </el-row>

    <!-- 联系信息 -->
    <el-row :gutter="20" class="contact-section">
      <el-col :span="24">
        <el-card class="contact-card">
          <template #header>
            <div class="clearfix">
              <span>联系我们</span>
            </div>
          </template>
          <div class="contact-content">
            <p><i class="el-icon-chat-dot-round"></i> 微信：alcmd0104</p>
            <p><i class="el-icon-message"></i> 邮箱：ailinlin241110@163.com</p>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
const version = ref('3.8.7')

function goTarget(url) {
  window.open(url, '_blank')
}
</script>

<style scoped lang="scss">
.home {
  padding: 20px;
  background: #f0f2f5;
  min-height: 80vh;

  .header-section {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #1890ff 0%, #40c4ff 100%);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 40px;

    .header-content {
      h1 {
        font-size: 36px;
        font-weight: 700;
        margin-bottom: 10px;
      }
      p {
        font-size: 18px;
        margin-bottom: 20px;
        opacity: 0.9;
      }
      .el-button {
        font-size: 16px;
        padding: 12px 24px;
        border-radius: 8px;
        transition: all 0.3s ease;
      }
      .el-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      }
    }
  }

  .feature-section {
    margin-bottom: 20px;

    .feature-card {
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(10px);
      border-radius: 12px;
      padding: 20px;
      text-align: center;
      transition: transform 0.3s ease;
      animation: fadeIn 0.5s ease-in-out;

      .feature-icon {
        font-size: 20px;
        color: #1890ff;
        margin-bottom: 10px;
      }
      h3 {
        font-size: 20px;
        margin-bottom: 10px;
      }
      p {
        color: #666;
        font-size: 14px;
      }
      &:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
      }
    }
  }

  .tech-section {
    margin-bottom: 20px;

    h2 {
      font-size: 28px;
      text-align: center;
      margin-bottom: 20px;
    }
    .tech-card {
      background: #fff;
      border-radius: 12px;
      padding: 20px;
      animation: fadeIn 0.5s ease-in-out;

      h3 {
        font-size: 20px;
        margin-bottom: 15px;
      }
      ul {
        list-style: none;
        padding: 0;
        li {
          font-size: 14px;
          color: #666;
          line-height: 2;
        }
      }
    }
  }

  .log-section {
    margin-bottom: 20px;

    .log-card {
      background: #fff;
      border-radius: 12px;
      animation: fadeIn 0.5s ease-in-out;

      .el-collapse-item__header {
        font-size: 16px;
        font-weight: 600;
      }
      ol {
        padding-left: 20px;
        li {
          font-size: 14px;
          color: #666;
          line-height: 1.8;
        }
      }
    }
  }

  .contact-section {
    .contact-card {
      background: #fff;
      border-radius: 12px;
      animation: fadeIn 0.5s ease-in-out;

      .contact-content {
        p {
          font-size: 14px;
          color: #666;
          line-height: 2;
          i {
            margin-right: 8px;
            color: #1890ff;
          }
        }
      }
    }
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
</style>